package com.easydisk.user.model.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.io.Serializable;

/**
 * <p>
 * 
 * </p>
 *
 * @author 曾深
 * @since 2023-09-16
 */
@Getter
@Setter
@Accessors(chain = true)
@TableName("user_and_role")
public class UserAndRole implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value ="\"id\"")
    @JsonSerialize(using = ToStringSerializer.class)

    private Long id;

    /**
     * 用户id
     */
    @TableField("user_id")
    @JsonSerialize(using = ToStringSerializer.class)

    private Long userId;

    /**
     * 角色id
     */
    @TableField("role_id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long roleId;
}
